package com.pmsystem.dao;

import com.pmsystem.pojo.Parking;
import com.pmsystem.pojo.ParkingExample;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface ParkingMapper {
    long countByExample(ParkingExample example);

    int deleteByExample(ParkingExample example);

    int insert(Parking record);

    int insertSelective(Parking record);

    List<Parking> selectByExample(ParkingExample example);

    int updateByExampleSelective(@Param("record") Parking record, @Param("example") ParkingExample example);

    int updateByExample(@Param("record") Parking record, @Param("example") ParkingExample example);

	/**  
	 * <p>Title: insertParking</p >  
	 * <p>Description:插入停车数据</p >  
	 * @author 魏家洛
	 * @param parking
	 * @return  
	 */  
	int insertParking(Parking parking);

	/**  
	 * <p>Title: checkCarLicenseIsInParking</p >  
	 * <p>Description:检查是否存在车牌号对应数据在停车场表内</p >  
	 * @author 魏家洛
	 * @param carlicense
	 * @return  
	 */  
	int checkCarLicenseIsInParking(@Param("carlicense") String carlicense);

	/**  
	 * <p>Title: selectParkingByCarLicenseWithNotPay</p >  
	 * <p>Description:查找没有支付费用的车牌号的对应数据</p >  
	 * @author 魏家洛
	 * @param carlicense
	 * @return  
	 */  
	Parking selectParkingByCarLicenseWithNotPay(@Param("carlicense") String carlicense);

	/**  
	 * <p>Title: updateParking</p >  
	 * <p>Description:更新停车信息</p >  
	 * @author 魏家洛
	 * @param parking
	 * @return  
	 */  
	int updateParkingEndTimeAndCash(Parking parking);

	/**  
	 * <p>Title: selectUseParkingAreaCount</p >  
	 * <p>Description:查询对应分区已经使用车位条数</p >  
	 * @author 魏家洛
	 * @param parkingArea
	 * @return  
	 */  
	int selectUseParkingAreaCount(@Param("parkingArea") Integer parkingArea);

	/**  
	 * <p>Title: updateParkingBePay</p >  
	 * <p>Description:设置对应车牌号更新为已缴费用</p >  
	 * @author 魏家洛
	 * @param carlicense
	 * @return  
	 */  
	int updateParkingBePay(@Param("carlicense") String carlicense);

}